package com.sinosoft.tcmneim.controller;

import com.sinosoft.tcmneim.dataObject.TblBasicinformation;
import com.sinosoft.tcmneim.dataObject.TblDiatrmentLargeipment;
import com.sinosoft.tcmneim.dataObject.TblHrPersosittion;
import com.sinosoft.tcmneim.service.TblDiatrmentLargeipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 医疗机构收支及人员收入情况 Controller
 *
 * @author bjc
 * @date 2021-09-15
 */
@Controller
@RequestMapping("/tblDiatrmentLargeipment")
public class TblDiatrmentLargeipmentController {

    @Autowired
    TblDiatrmentLargeipmentService tblDiatrmentLargeipmentService;
    /**
     * 查询医疗机构收支及人员收入情况
     */
    @GetMapping("/list")
    @ResponseBody
    public List<TblDiatrmentLargeipment> list(){
        List<TblDiatrmentLargeipment>list=tblDiatrmentLargeipmentService.list();
        return list ;
    }
    /**
     * 根据ID查询医疗机构收支及人员收入情况
     */
    @GetMapping("/selectByItemCode/{itemCode}")
    @ResponseBody
    public Object selectByItemCode(@PathVariable("itemCode")String itemCode){
        return tblDiatrmentLargeipmentService.selectByItemCode(itemCode);
    }
    /**
    /**
     * 新增医疗机构收支及人员收入情况
     */
    @PostMapping("/save")
    public int save(TblDiatrmentLargeipment tblDiatrmentLargeipment){
        return tblDiatrmentLargeipmentService.insert(tblDiatrmentLargeipment);
    }
    /**
     * 修改医疗机构收支及人员收入情况
     */
    @PostMapping("/updated")
    public int updated(TblDiatrmentLargeipment tblDiatrmentLargeipment){
        return tblDiatrmentLargeipmentService.updated(tblDiatrmentLargeipment);
    }
    /**
     * 删除医疗机构收支及人员收入情况
     */
    @PostMapping( "/remove")
    public int remove(String  itemCode)
    {
        return tblDiatrmentLargeipmentService.deleteByItemCode(itemCode);
    }
}
